package com.bmps.springcloud.insuredmicroservice.repository.accept.coresystem;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * @author jackdaw
 */
@Repository
public interface AccountInfoRepository {

    /**
     * 查询银行账号存在冲突账户名情况
     *
     * @param accountName 账户名
     * @param accountNo   账号
     * @return 冲突数量
     */
    @Select("select count(1) from lis.lcaccount where bankaccno=#{accountNo,jdbcType=VARCHAR} and accname<>#{accountName,jdbcType=VARCHAR}")
    int queryConflictingNameByBankAccountNo(@Param("accountName") String accountName, @Param("accountNo") String accountNo);
}
